package org.enlongWu.pojo;


import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Pattern;
import lombok.Data;
import org.enlongWu.anno.MessageState;
import org.enlongWu.anno.State;
import org.hibernate.validator.constraints.URL;

import java.time.LocalDateTime;

@Data
public class Message {
    private Integer id;//主键ID
    @NotEmpty
    @Pattern(regexp = "^\\S{1,10}$")
    private String title;//标题
    @NotEmpty
    private String content;//内容

    @MessageState
    private String state;//状态：已读、未读、删除
//    @NotNull
    private Integer messageType;//消息类型id：请求1，通知2，警报3
    private Integer sendUser;//发送者ID（无请求方时，默认system）
    private Integer receiveUser;//接收者ID
    private LocalDateTime createTime;//创建时间
}
